{/*左侧菜单开始*/}

<style>
    .main-sidebar{
        background-color: #001529 !important;
         margin-top: 30px;
       
    }
.skin-blue .sidebar-menu>li:hover>a, .skin-blue .sidebar-menu>li.active>a {
    background-color: #1890FF;
    border-left: 1px solid #1890FF;
    transition: all .5s;
}
/* .sidebar-menu span{
margin-left: 20px;
} */
.skin-blue .treeview-menu>li>a{
    margin-left: 20px;
    line-height: 30px;
}
.sidebar-menu .treeview-menu{
    background-color: #000C17 !important;
}
</style>
<aside class="main-sidebar">
    <section class="sidebar">
      
        <ul class="sidebar-menu">
           
            <li>
                <a href="{:url('Index/index')}">
                    <i class=""></i>
                    <span>首页</span>
                </a>
            </li>
            <?php $hasPermissionsIdsArr = array_keys($hasPermissionsArr);?>
            {volist name="treeMenu" id="menuInfo" key="k"}
            {if condition="$menuInfo['status'] && (session('user_com')['role_id']==0 || in_array($menuInfo['id'],$hasPermissionsIdsArr))"}
                <?php if(empty($menuInfo["list"]) || array_sum(array_column($menuInfo["list"], "status"))<1) { ?>
                <li>
                    <a href="{:url(MODULE_NAME.'/'.$menuInfo.url)}">
                        <i class="{$menuInfo.icon}"></i>
                        <span>{$menuInfo.title}</span>
                    </a>
                </li>
                <?php }else{ ?>
                <li class="treeview {if condition="in_array(CONTROLLER_NAME.'/index', (array_column($menuInfo.list, 'url')))"} active{/if}">
                    <a href="javascript:void(0);">
                        <i class="{$menuInfo.icon | default=''}"></i>
                        <span>{$menuInfo.title}</span>
                        <span class="pull-right-container">
                            <i class="fa fa-angle-left pull-right"></i>
                        </span>
                    </a>
                    <ul class="treeview-menu">
                        {volist name="menuInfo.list" id="v"}
                        {if condition="$v['status'] && (session('user_com')['role_id']==0 || in_array($v['id'],$hasPermissionsIdsArr))"}
                        <li class='{if condition="(CONTROLLER_NAME.'/'.ACTION_NAME) == $v.url"}active{/if}'>
                            <a href="{:url(MODULE_NAME.'/'.$v.url)}"><i class="{$v.icon}"></i>{$v.title}</a>
                        </li>
                        {/if}
                        {/volist}
                    </ul>
                </li>
                <?php } ?>
            {/if}
            {/volist}
        </ul>
    </section>
</aside>
{/*左侧菜单结束*/}
